how to define a function in matlab. There are any references about how to define a function in matlab in here. you can look below.